The present invention relates to reading and writing data on a tape storage medium, and more particularly to reading and writing compressed and/or encrypted data on tape.
A tape drive is a data storage device that reads and writes data on a magnetic tape storage medium. Tape storage is typically used for offline backup and archival of data, meaning data is written to a tape, and the tape is removed (e.g., un-mounted) from the tape drive and stored in a tape library. If the data on the tape is needed at a later time (e.g., restoring lost or corrupted data), the tape may be re-mounted on a tape drive and the data restored to a storage medium (e.g., disk storage).
Data may be written to, or read from, a tape in segments called records. When writing a record on a tape, the tape drive may use a compression algorithm to reduce the size of the data. In some cases the size reduction may be very substantial (e.g., text data may compress to on tenth the original uncompressed size). When the record is written, the tape drive may also write metadata (e.g., a tape control symbol) indicating the compression algorithm used to compress the data. When a hosts requests that the tape drive read the record, the tape drive may detect the tape metadata to determine that the data in the record is compressed and identify the decompression algorithm needed to decompress the data. The tape drive reads the record from the tape medium, decompresses the data, and then provides the decompressed record to the host.